package com.lqq.demo9;

public class Animal {
    private String nickName;
    private String color;
    private int age;
    private double weight;

    /*public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }*/

    public Animal() {
    }

    public Animal(String nickName, String color, int age, double weight) {
        this.nickName = nickName;
        this.color = color;
        this.age = age;
        this.weight = weight;
    }

    public void print(){
        System.out.println("昵称：" + this.nickName);
        System.out.println("颜色：" + this.color);
        System.out.println("年龄：" + this.age);
        System.out.println("体重：" + this.weight);
    }
}
